
#ifndef BNETMESSAGE_H
#define BNETMESSAGE_H

#include <string>
using namespace std;

#include <qstring.h>


// Container class for a Bnet message from the Bnet server.

class BnetMessage 
{
 public:
    enum MessageType 
	{
	    // An empty BnetMessage.
	    Null = 0,

	    // A Bnet ChatEvent.
	    ChatEvent,

	    // A whisper from a mutual friend that joined a game.
	    // This also implies a Bnet ChatEvent.
	    FriendJoinedGame,
	    
            // The local user logged onto bnet.
	    EnterChat,
	    // The local user logged off bnet.
	    LeaveChat,

	    // Local user typed something.
	    ChatCommand,

	    // A Message that is not a ChatEvent.  The
	    // QString text_ will hold information on this
	    // BnetMessage.
	    NonChatEvent,

	    // Message from this comp.
	    System
	};


    BnetMessage( const MessageType& type = Null,
		 const QString& text = "",
		 const QString& user = "" );

    MessageType type;
    Q_UINT8 pktID;
    QString text;
    QString user;
    
    Q_UINT32 eventID;
    Q_UINT32 flags;
    Q_UINT32 ping;
    
    QString gameName;
};





#endif
